package org.example.transparent;

/**
 * @author ZerlindaLi create at 2021/3/30 13:52
 * @version 1.0.0
 * @description Course
 */
public class Course extends CourseComponent{
    private String name;

    private Double price;

    public Course(String name, Double price) {
        this.name = name;
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public void print(){
        System.out.println(name + " (￥" + price + "元)");
    }
}
